package com.lancoo.ccas53.pojo.common;

/**
 * @Author: liufeng
 * @CreateTime: 2024-06-13  17:10
 * @Description:
 */

public enum ProhibitType {
    TIME(1, "时间"),
    ROOM(2, "场地"),
    TEACHINGCLASS(3, "课程教学班"),
    TEACHER(4, "教师");

    private int code;
    private String msg;

    ProhibitType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static ProhibitType getByCode(int code) {
        for (ProhibitType value : ProhibitType.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}
